package praktikumid.w09.p3;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;

public class DrawOvalListener implements ActionListener {

	@Override
	public void actionPerformed(ActionEvent e) {
		JButton b = (JButton) e.getSource();
		//System.out.println(e.getSource());
		ButtonPanel bp = (ButtonPanel) b.getParent();
		//MyFrame f = bp.frame;
		MyFrame f = (MyFrame) bp.getParent().getParent().getParent().getParent();
		DrawPanel dp = (DrawPanel) f.getContentPane().getComponent(1);
		dp.drawOval();
		
	}

}
